#include "StdAfx.h"
#include "QuickMotion.h"


QuickMotion::QuickMotion(int instructionNumber,MY_DATATYPE x,MY_DATATYPE y,MY_DATATYPE z):ConfigurationState(instructionNumber)
{
	this->x = x;
	this->y = y;
	this->z = z;
	this->isKeyState = true;
}


QuickMotion::~QuickMotion(void)
{
}

void QuickMotion::perform(MillingMachine3C * machine,MillingTool * tool) 
{
	tool->MoveTo(this->x,this->y,this->z);
}

void QuickMotion::serialize(std::ostream & out)
{
	out<<this->lineNumberChar<<this->number<<"G00X"<<this->x<<"Y"<<this->y<<"Z"<<this->z<<"\n\r";
}